﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Betop.Lib.Core.Right
{
    public interface ISystemRightDAL
    {


        int OwnerType
        {
            set;
        }

        /// <summary>
        /// 保存拥有者权限
        /// </summary>
        /// <param name="iOwnerID"></param>
        /// <param name="iRightID"></param>
        /// <returns></returns>
        void SaveRight(int ownerID, int rightID);

        /// <summary>
        /// 批量保存拥有者权限
        /// </summary>
        /// <param name="iOwnerID"></param>
        /// <param name="lstRightID"></param>
        /// <returns></returns>
        void SaveRight(int ownerID, List<int> lstRightID);

        /// <summary>
        /// 根据权限批量保存拥有者
        /// </summary>
        /// <param name="lstOwnerID"></param>
        /// <param name="iRightID"></param>
        /// <returns></returns>
        void SaveRight(List<int> lstOwnerID, int rightID);

        /// <summary>
        /// 根据拥有者获得权限
        /// </summary>
        /// <param name="iOwnerID"></param>
        /// <returns></returns>
        List<int> GetRightIDs(int ownerID);

        /// <summary>
        /// 根据权限获得拥有者
        /// </summary>
        /// <param name="iRightID"></param>
        /// <returns></returns>
        List<int> GetOwnerIDs(int rightID);

        /// <summary>
        /// 判断是否拥有该权限
        /// </summary>
        /// <param name="iOwnerID"></param>
        /// <param name="iRightID"></param>
        /// <returns></returns>
        bool HaveRight(int ownerID, int rightID);
    }
}
